package org.edu.common.base;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;
import org.jeecgframework.poi.excel.annotation.Excel;

import java.io.Serializable;

/**
 * @author Erik Zhang
 * @version 1.0
 * @since 2021/2/13
 */
@Data
@ToString(callSuper = true)
public abstract class BaseEntity implements Serializable {

    /**
     * 主键id
     */
    @TableId(type = IdType.AUTO)
    @ApiModelProperty(value = "id")
    private Integer id;

    /**终端*/
    @Excel(name = "终端", width = 15)
    @ApiModelProperty(value = "终端")
    private Integer terminalId;

    /**
     * 创建人ID
     */
    @TableField
    @ApiModelProperty(hidden = true)
    private String createBy;

    /**
     * 创建日期
     */
    @TableField
    @ApiModelProperty(hidden = true)
    @JsonFormat(timezone="GMT+8",locale="zh",  pattern="yyyy-MM-dd hh:mm:ss")
    private String createDate;


    /**
     * 创建人名称
     */
    @TableField
    @ApiModelProperty(hidden = true)
    private String createName;

}
